//package lib.bone.admin.controller.fix;
//
//import io.swagger.annotations.Api;
//import io.swagger.annotations.ApiOperation;
//import lib.bone.common.constant.ResponseCodeConst;
//import lib.bone.common.core.domain.ResponseDTO;
//import lib.bone.flow.domain.entity.FlowTask;
//import lib.bone.flow.service.FlowTaskService;
//import lombok.extern.slf4j.Slf4j;
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.web.bind.annotation.PathVariable;
//import org.springframework.web.bind.annotation.PostMapping;
//import org.springframework.web.bind.annotation.RequestMapping;
//import org.springframework.web.bind.annotation.RestController;
//
//import java.util.List;
//
///**
// * @author kindear
// */
//@RestController
//@RequestMapping("flow/fix")
//@Slf4j
//@Api(tags = "流程记录修复")
//public class FlowTaskFixController {
//    @Autowired
//    FlowTaskService taskService;
//
//    @PostMapping("{field}")
//    @ApiOperation(value = "修复字段内容",notes = "目前只支持修复 serviceName")
//    public ResponseDTO<Object> fixTaskField(@PathVariable("field") String field){
//        log.info(field);
//        if (field.equals("serviceName")){
//            // 全量查询
//            List<FlowTask> tasks = taskService.getAll();
//            tasks.forEach(task->{
//                taskService.buildServiceName(task);
//            });
//            return ResponseDTO.succMsg("成功执行");
//        }else {
//            return ResponseDTO.wrap(ResponseCodeConst.SERVICE_UNAVAILABLE);
//        }
//    }
//}
